/**
 */
package org.aphelie.chronicle.character.util;

import org.aphelie.chronicle.ArcElement;
import org.aphelie.chronicle.ArcMessageProvider;
import org.aphelie.chronicle.ArcSheet;
import org.aphelie.chronicle.ArcTopic;
import org.aphelie.chronicle.character.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see org.aphelie.chronicle.character.CharacterPackage
 * @generated
 */
public class CharacterSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static CharacterPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CharacterSwitch() {
		if (modelPackage == null) {
			modelPackage = CharacterPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case CharacterPackage.ARC_CHARACTER: {
				ArcCharacter arcCharacter = (ArcCharacter)theEObject;
				T result = caseArcCharacter(arcCharacter);
				if (result == null) result = caseArcTopic(arcCharacter);
				if (result == null) result = caseArcElement(arcCharacter);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CharacterPackage.ARCHETYPE: {
				Archetype archetype = (Archetype)theEObject;
				T result = caseArchetype(archetype);
				if (result == null) result = caseArcSheet(archetype);
				if (result == null) result = caseArcCharacter(archetype);
				if (result == null) result = caseArcTopic(archetype);
				if (result == null) result = caseArcMessageProvider(archetype);
				if (result == null) result = caseArcElement(archetype);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CharacterPackage.TRAITS: {
				Traits traits = (Traits)theEObject;
				T result = caseTraits(traits);
				if (result == null) result = caseArcSheet(traits);
				if (result == null) result = caseArcTopic(traits);
				if (result == null) result = caseArcMessageProvider(traits);
				if (result == null) result = caseArcElement(traits);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CharacterPackage.CAPACITIES: {
				Capacities capacities = (Capacities)theEObject;
				T result = caseCapacities(capacities);
				if (result == null) result = caseArcSheet(capacities);
				if (result == null) result = caseArcTopic(capacities);
				if (result == null) result = caseArcMessageProvider(capacities);
				if (result == null) result = caseArcElement(capacities);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case CharacterPackage.AVATAR: {
				Avatar avatar = (Avatar)theEObject;
				T result = caseAvatar(avatar);
				if (result == null) result = caseArcSheet(avatar);
				if (result == null) result = caseArcCharacter(avatar);
				if (result == null) result = caseArcTopic(avatar);
				if (result == null) result = caseArcMessageProvider(avatar);
				if (result == null) result = caseArcElement(avatar);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Arc Character</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Arc Character</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseArcCharacter(ArcCharacter object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Archetype</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Archetype</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseArchetype(Archetype object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Traits</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Traits</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseTraits(Traits object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Capacities</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Capacities</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseCapacities(Capacities object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Avatar</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Avatar</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAvatar(Avatar object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Arc Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Arc Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseArcElement(ArcElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Arc Topic</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Arc Topic</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseArcTopic(ArcTopic object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Arc Message Provider</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Arc Message Provider</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseArcMessageProvider(ArcMessageProvider object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Arc Sheet</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Arc Sheet</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseArcSheet(ArcSheet object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //CharacterSwitch
